Documentation

Demo - OpenAI - Open Dev Kit Documentation

Open Dev Kit Documentation :: Demo - OpenAI

The Open AI demo is a basic app showcasing integration with Open AI APIs, offering Chat, image generation/editing/variation. Users must set up an API key via their Open AI account and ensure billing is active. After entering a valid API key they can freely use the current features of the demo, configure variables like temperature and max tokens, and create additional features of their own. The demo is designed to be modular enough so that users may easily use and potentially expand upon it.

How it Works

The interface primarily uses Windows with various Controls (Containers, Labels, Textboxes, Listboxes, Buttons, Sliders, and Toggles) to manage features. Communication with Open AI servers is triggered via scripts in the Clicked event for btnChatSend in the Chat Window and btnImageGenerate in the Image Window.

Chat & Image Requests

  1. A request is sent using either:
  2. The result is stored in a variable of type AIResult.
  3. The script waits for AIResult.Ready to become 1 (true), signaling the request is complete.
  4. If AIResult.Error contains a value, an error occurred, and will be displayed via an alert box.
  5. If AIResultChoice.FinishReason is anything other than "stop", this means an error occurred and is displayed inline.
  6. Otherwise, the output is processed and the response is retrieved from AIResult.Choices / AIResultChoice.Content.

If you think anything is missing, please feel free to: submit documentation feedback on this page